<template>
  <BasicModal v-bind="$attrs" title="详情" @register="registerModal" :showCancelBtn="false" :minHeight="700" :showOkBtn="false">
    <div class="detail">
      <div> 券码：{{ code }} </div>
      <div class="ms"> 上传时间： {{ time }} </div>
      <Image :src="aravat" :width="400" />
    </div>
  </BasicModal>
</template>
<script lang="ts" setup>
  import { BasicModal, useModalInner } from '/@/components/Modal';
  import { ref } from 'vue';
  import { Image } from 'ant-design-vue';
  // 获取父级组件值
  const code = ref('');
  const time = ref('');
  const aravat = ref('');
  const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data) => {
    code.value = data.record.code;
    time.value = data.record.createTime;
    aravat.value = data.record.couponCode;
  });
</script>
<style scoped>
  .detail {
    width: 100%;
    display: flex;
    flex-direction: column;
    padding: 20px 40px;
  }
  .ms {
    margin: 10px 0 40px 0;
  }
</style>
